import { Entity, Column, PrimaryGeneratedColumn, DeleteDateColumn, CreateDateColumn, UpdateDateColumn } from 'typeorm';

@Entity('student')
export class EyemanagerStudentEntity {
    @PrimaryGeneratedColumn({ type: 'bigint', unsigned: true })
    id: number;

    @Column({ type: 'varchar', length: 255, collation: 'utf8mb4_unicode_ci', default: '', comment: '姓名' })
    name: string;

    @Column({ type: 'date', comment: '生日' })
    birthday: Date;

    @Column({ type: 'int', comment: '控涨前度数' })
    begin_control: number;

    @Column({ type: 'int', comment: '控涨后度数' })
    after_control: number;

    @Column({ type: 'int', comment: '控涨方案' })
    control_plan: number;

    @Column({ type: 'int', comment: '控涨结果' })
    control_result: number;

    @Column({ type: 'int', comment: '今日项目' })
    today_plan: number;

    @Column({ type: 'varchar', length: 255, collation: 'utf8mb4_unicode_ci', default: '', comment: '会员编号' })
    member_id: string;

    @Column({ type: 'varchar', length: 255, collation: 'utf8mb4_unicode_ci', default: '', comment: '身份证号' })
    card_id: string;

    @Column({ type: 'int', comment: '积分' })
    score: number;

    @Column({ type: 'tinyint', comment: '性别' })
    sex: number;

    @Column({ type: 'varchar', length: 255, collation: 'utf8mb4_unicode_ci', default: '', comment: '电话' })
    phone: string;

    @Column({ type: 'decimal', precision: 8, scale: 2, comment: '余额' })
    money: number;

    @Column({ type: 'varchar', length: 255, collation: 'utf8mb4_unicode_ci', default: '', comment: '昵称' })
    alias: string;

    @Column({ type: 'tinyint', comment: '状态' })
    status: number;

    @Column({ type: 'tinyint', comment: '类型' })
    type: number;

    @CreateDateColumn({ type: 'timestamp', nullable: true })
    created_at: Date;

    @UpdateDateColumn({ type: 'timestamp', nullable: true })
    updated_at: Date;

    @DeleteDateColumn({ type: 'timestamp', nullable: true })
    deleted_at: Date;
}